/* 
 * File:   Player.h
 * Author: yuu
 *
 * Created on September 6, 2011, 6:02 PM
 */


#include <string>
#include <list>
#include "Cell.h"
using namespace std;
#ifndef PLAYER_H
#define	PLAYER_H

class Player {
public:
    Player();
    Player(const Player& orig);
    Player(string name);
    virtual ~Player();
    /**
     * gives player p an amount of money
     * @param p receiver
     * @param price amount
     */
    void Pay(const Player& p, int price);
    /**
     * increases player's level and gives him moneyzzzzzz
     * @return 
     */
    void LvlUp();
    /**
     * moves player to the destination
     * /used with warps/
     * @param dest destination
     */
    void MoveTo(class Cell& dest);
    /**
     * moves the player to a neighbor cell
     * @return the destination
     */
    Cell MoveOnce();
    /**
     * moves the player i times
     * @param i
     * @return the final destination
     */
    Cell Move(int i);
    /**
     * @return true if player have all symbols
     */
    bool FullSymbols();
    /**
     * buys a property
     * @param b the property
     */
    void Buy(class Buyable& b);
        
    
private:
   /**
     * kickass name
     */
   string name;
   /**
    * money in da pocket
    */
   int money;
   /**
    * money in stocks, properties and pocket
    */
   int totalmoney;
   /**
    * current level
    */
   int lvl;
   /**
    * position before last movement
    */
   Cell lastPos;
   /**
    * current position
    */
   Cell position;
   /**
    * list of properties
    */
   list<Buyable *> houses;
   bool* symbols;
};

#endif	/* PLAYER_H */

